audio_form object
This method will return a textual representation of the attributes for a given control.
string get_control_attributes(int control_id)
Parameters:
control_id
The control ID to retrieve the attributes from.
Return value:
The control attributes on success, or an empty string on failure.
Remarks:
The text that this method returns is the text that the form uses to announce the control types to the end user.
Example:
// Make a simple form with a few buttons.
#include "form.bgt"
audio_form form;
void main()
{
form.create_window("Example Form", true);
int ok=form.create_button("OK");
int cancel=form.create_button("E&xit");
while(true)
{
form.monitor();
wait(5);
if(form.is_pressed(ok))
{
alert("Information", "The control type of OK is "+form.get_control_attributes(ok));
exit();
}
if(form.is_pressed(cancel))
{
exit();
}
if((key_down(KEY_LMENU))&&(key_pressed(KEY_F4)))
{
exit();
}
}
}